﻿<%@ WebHandler Language="C#" Class="VerifyImage" %>

using System;
using System.Web;
using System.Web.SessionState;

using BOSS.Web;

public class VerifyImage : IHttpHandler, IRequiresSessionState {
    
    public void ProcessRequest (HttpContext context) {
        string verifyCode = VerifyImageCreator.CreateImage(context.Response, 4);
        context.Response.AddHeader("P3P: CP", "ALL ADM DEV PSAi COM OUR OTRo STP IND ONL");
        context.Session[VerifyImageCreator.DEFAULT_VERIFY_CODE_KEY] = verifyCode;
    }
 
    public bool IsReusable {
        get {
            return true;
        }
    }
}
